def create_Rect_HookRF
    model = Sketchup.active_model
    prompts = ["长度", "保护层","主筋直径","箍筋直径"]
    defaults = ["750","25","25","10"]
    input = UI.inputbox(prompts, defaults, "创建拉钩")
    group = model.active_entities.add_group
    entities = group.entities
    dia = input[3].to_f.mm
    mainDia = input[2].to_f.mm
    h = input[1].to_f.mm
    l = input[0].to_f.mm - h * 2

    points = [                                  #2个角点
         Geom::Point3d.new(3*dia,  0.5*dia,   0),
         Geom::Point3d.new(l-3*dia,  0.5*dia,   0)          
    ]
    entities.add_line points

      sin45 = 0.707
      tth1X = 3*dia-2.5*dia*sin45
      tth1y = 3*dia + 2.5*dia*sin45
      tth2X = tth1X+10*sin45*dia
      tth2y = tth1y+10*sin45*dia
      edges = entities.add_line Geom::Point3d.new(tth1X,tth1y,0),Geom::Point3d.new(tth2X,tth2y,0)

      vector = Geom::Vector3d.new 1,1,0
      vector2 = vector.normalize!
      face = entities.add_face(entities.add_circle Geom::Point3d.new(tth2X,tth2y,0), vector2, dia/2)

      tth3X = l - tth1X
      tth3y = tth1y
      tth4X = tth3X-10*sin45*dia
      tth4y = tth3y+10*sin45*dia
      entities.add_line Geom::Point3d.new(tth3X,tth3y,0),Geom::Point3d.new(tth4X,tth4y,0)
  
      vector = Geom::Vector3d.new 0,0,1
      vector2 = Geom::Vector3d.new 1,0,0
      vector3 = vector.normalize!
      cpoint1 =   Geom::Point3d.new(3*dia,  3*dia,   0)
      cpoint2 =   Geom::Point3d.new(l - 3*dia,  3*dia,   0)
      
      entities.add_arc cpoint1, vector2, vector3, 2.5*dia, 135.degrees, 270.degrees
      entities.add_arc cpoint2, vector2, vector3, 2.5*dia, 270.degrees, 405.degrees
      


      face.followme(edges.all_connected)

     ##########

      group2 = group.entities.add_group
      entities = group2.entities

      points = [                                  #2个端点
          Geom::Point3d.new(-h,  3*dia,   0),
          Geom::Point3d.new(l+h,  3*dia,   0)          
     ]
     entities.add_line points #两端连线

      cpoint1 =   Geom::Point3d.new(dia + mainDia/2,  3*dia,   0)
      cpoint2 =   Geom::Point3d.new(l - dia - mainDia/2,  3*dia,   0)

      entities.add_circle cpoint1,vector,mainDia/2
      entities.add_circle cpoint2,vector,mainDia/2






 end